Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

456
Visualizações
Getting different Pod status from "kubectl get pod" and "kubectl describe pod" command

I created a Pod with two container – one container was successfully created, while other container failed.

Now, when I execute below command then I see that “Status” is “Error”:

C:\Users\test123>kubectl get pod pod3-two-nginx-containers-port-error
NAME                                   READY   STATUS   RESTARTS   AGE
pod3-two-nginx-containers-port-error   1/2     Error    0          134m

But when I execute below command then I see that "Status" is "Running":

C:\Users\test123>kubectl describe pod pod3-two-nginx-containers-port-error
Name:         pod3-two-nginx-containers-port-error
Namespace:    default
Priority:     0
Node:         minikube/192.168.49.2
Start Time:   Thu, 18 Mar 2021 12:50:19 +0530
Labels:       <none>
Annotations:  <none>
Status:       Running
IP:           10.244.0.9
IPs:

Why Kubernetes is showing wrong statuses?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Kubernetes is not showing the wrong status.

  • From kubectl get pod <<POD_NAME>> command you get the Pod’s status.
  • From kubectl describe pod <<POD_NAME>> you get the Pod phase’s status. Read more about Pod phases status over here.

kubectl describe pod is giving you status as RUNNING because Pod has been bound to a node + all of the containers have been created + at least one container is still running. Same you can read over the link I have shared over.

kubectl get pod is giving you status as ERROR because Pod is not in healthy state. Right now I do not have link where you can read about what STATUS field means in kubectl get pod but probably I will find and share later.

Another way you can verify this is by running kubectl get pods --field-selector=status.phase=Running command. If you get you Pod listed here then it is another way you can be sure of that status shown in kubectl describe pod command is Pod phase's status.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda